﻿using System;

namespace ConsoleApp15
{
    class Program
    {
     

        static void Main(string[] args)
        {
            Message message = new Message ();
            message.Id = 5;
            message.Name = "苦力怕";
            message.LifeValue = 1200;
            message.PhysicalStrength = 1900;
            Console.WriteLine("编号:"+message .Id );
            Console.WriteLine("名字:"+message .Name);
            Console.WriteLine("成绩");
            message.Total();
            message.Avg();



            Message2 message1 = new Message2();
            Imessage imessage = message1;      //创建接口的实例
            imessage.Id = 5;
            imessage.Name = "李明";
            message1.LifeValue = 2100;
            message1.PhysicalStrength = 2500;

            Console.WriteLine("学号：" + imessage.Id);
            Console.WriteLine("姓名：" + imessage.Name);
            Console.WriteLine("成绩信息如下：");
            imessage.Total();
            imessage.Avg();
        }
    }
}
